﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>

<%if (v.data("menutype").ToString() == "menulinkclist"){ %>
<%List<Menulink> list = v.data("list") as List<Menulink>; %>
  <div class="modeltitle">按导航大类查看</div>
  <div class="scrolltext">
      <div class="srcolcontent" style="height:75px;" id="modelleftcontent">
          <ul>
              <%foreach (Menulink row in list){%>
              <%if (ctx.getInt("mlid") == row.Id){%>
              <li><b><%=row.menuname %></b></li>
              <%}else{%>
              <li><a href="#{index}?loadfun=<%=v.data("menutype") %>&menuname_title=<%=System.Web.HttpUtility.UrlEncode(row.menuname) %>&menuid=<%=ctx.getInt("menuid") %>&mlid=<%=row.Id %>" title="<%=row.menuname %>"><%=row.menuname %></a></li>
              <%} %>
              <%} %>
          </ul>
      </div>
  </div>
<%}else if (v.data("menutype").ToString() == "articlelist") { %>
<%var list = v.data("list") as List<Model>; %>
<%var list1 = v.data("list1") as List<TypeList>; %>
<div class="modeltitle">按所属模型查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:75px;">
		<ul>
			<%foreach (var row in list){%>
			<%if (ctx.getInt("mid") == row.Id){%>
			<li><b><%=row.modelname %></b></li>
			<%}else{%>
			<li><a href="#{index}?loadfun=<%=v.data("menutype") %>&menuname_title=<%=System.Web.HttpUtility.UrlEncode(row.modelname) %>&menuid=<%=ctx.getInt("menuid") %>&mid=<%=row.Id %>" title="<%=row.modelname %>"><%=row.modelname %></a></li>
			<%} %>
            <%} %>
		</ul>
	</div>
</div>

<div class="modeltitle2">按分类查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:250px;" id="srcolcontent">
		<ul>
            <%foreach(var row in list1){ %>
			<%if(row.level>0){ %><li class="tree<%=row.level %>"><%}else{%><li><%} %>
                <%if(row.Id == ctx.getInt("tid")){ %>
				<b><%=row.typename %></b>
				<%}else{%>
                    <%if(row.styleid ==4){ %>
						<p class="tabclick" datatype="iframe" datalink="<%=link.to(new wojilu.Web.Controller.Admin.Qycms.ArticleController().ArticleEdit,row.linkid) %>?tid=<%=row.Id %>&mid=<%=row.mid %>&type=edit&iframename=jerichotabiframe_0" iconimg="#{path.img}ybb/images/tab.gif" jerichotabindex="10000"><a href="#body" class="tabclicklink" hidefocus="true"><%=row.typename %></a></p>
					<%}else{%>
						<a href="#{index}?loadfun=<%=v.data("menutype") %>&menuname_title=<%=System.Web.HttpUtility.UrlEncode(row.typename) %>&menuid=<%=ctx.getInt("menuid") %>&tid=<%=row.Id %>&mid=<%=row.mid %>" title="<%=row.typename %>"><%=row.typename %></a>
					<%} %>
				<%} %>
			</li>
			<%} %>
		</ul>
	</div>
</div>
<%}else if (v.data("menutype").ToString() == "seolinklist" || v.data("menutype").ToString() == "seolinktypelist") { %>
<div class="modeltitle">按所属模型查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:75px;">
		<ul>
			[%forlist from=$modelarray key=i%]
			[%if $modelarray[i].selected=='selected'%]
			<li><b>[%$modelarray[i].modelname%]</b></li>
			[%else%]
			<li><a title="[%$modelarray[i].modelname%]" href="[%$modelarray[i].url%]" title="[%$modelarray[i].modelname%]">[%$modelarray[i].modelname%]</a></li>
			[%/if%]
			[%/forlist%]
		</ul>
	</div>
</div>

<div class="modeltitle2">按分类查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:250px;" id="srcolcontent">
		<ul>
			[%forlist from=$typelist key=i%]
			[%if $typelist[i].level>0%]<li class="tree[%$typelist[i].level%]">[%else%]<li>[%/if%]
				[%if $typelist[i].selected=='selected'%]
				<b>[%$typelist[i].typename%]</b>
				[%else%]
				<a title="[%$typelist[i].typename%]" href="[%$typelist[i].url%]" title="[%$typelist[i].typename%]">[%$typelist[i].typename%]</a>
				[%/if%]
			</li>
			[%/forlist%]
		</ul>
	</div>
</div>
<%}else if (v.data("menutype").ToString() == "typelist" || v.data("menutype").ToString() == "subjectlist" || v.data("menutype").ToString() == "recomlist") { %>
<%List<Model> list = v.data("list") as List<Model>; %>
<div class="modeltitle">按所属模型查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:75px;" id="modelleftcontent">
		<ul>
            <%foreach(var row in list){ %>
            <%if(row.isbase==0){ %>
                <%if(row.Id == ctx.getInt("mid")){ %>
				<li><b><%=row.modelname %></b></li>
				<%}else{ %>
				<li><a href="<%=link.to(new wojilu.Web.Controller.Admin.QycmsController().Index) %>?loadfun=#{menutype}&menuname_title=<%=System.Web.HttpUtility.UrlEncode(ctx.get("menuname_title")) %>&menuid=1&mid=<%=row.Id %>" title="[%$modelarray[i].modelname%]"><%=row.modelname %></a></li>
				<%} %>
			<%} %>
            <%} %>
		</ul>
	</div>
</div>
<%}else if (v.data("menutype").ToString() == "memberlist") { %>
<div class="modeltitle">按会员等级查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:75px;" id="modelleftcontent">
		<ul>
			[%forlist from=$memberclass key=i%]
				[%if $memberclass[i].selected=='selected'%]
				<li><b>[%$memberclass[i].rankname%]</b></li>
				[%else%]
				<li><a href="[%$memberclass[i].url%]" title="[%$memberclass[i].rankname%]">[%$memberclass[i].rankname%]</a></li>
				[%/if%]
			[%/forlist%]
		</ul>
	</div>
</div>
<%}else if (v.data("menutype").ToString() == "advertlist") { %>
<%List<Advert_Type> list = v.data("list") as List<Advert_Type>; %>
<div class="modeltitle">按广告位查看</div>
<div class="scrolltext">
	<div class="srcolcontent" style="height:75px;" id="modelleftcontent">
		<ul>
            <%foreach(var row in list){ %>
                <%if(row.Id == ctx.getInt("atid")){%>
				<li><b><%=row.adtypename %></b></li>
				<%}else{ %>
				<li><a href="<%=link.to(new wojilu.Web.Controller.Admin.QycmsController().Index) %>?loadfun=#{menutype}&menuname_title=<%=System.Web.HttpUtility.UrlEncode(ctx.get("menuname_title")) %>&menuid=5&atid=<%=row.Id %>" title="<%=row.adtypename %>"><%=row.adtypename %></a></li>
				<%} %>
			<%} %>
		</ul>
	</div>
</div>
<%} %>